<?php

// Composer: "fzaninotto/faker": "v1.3.0"
use Faker\Factory as Faker;

class KipemsTableSeeder extends Seeder {

	public function run()
	{
		$faker = Faker::create();

		foreach(range(1, 10) as $index)
		{
			Kipem::create([
				'lokasi_id' => $faker->numberBetween($min = 1, $max = 5),
				'nomor' => $faker->bothify($string = 'KIPS/##/??-####'),
				'no_ktp' => $faker->randomNumber($nbDigits = 8),
				'nama' => $faker->name($gender = null|'male'|'female'),
				'keterangan' => $faker->sentence($nbWords = 6),
				'jenis_kelamin' => $faker->randomElement($array = array ('L','P')),
				'golongan_darah' => $faker->randomElement($array = array ('O','A','B','AB')),
				'tempat_lahir' => $faker->city,
				'tanggal_lahir' => $faker->date($format = 'Y-m-d', $max = 'now'),
				'agama_id' => $faker->numberBetween($min = 1, $max = 5),
				'pendidikan_id' => 1,
				'jenis_pekerjaan_id' => 1,
				'status_penghasilan_id' => 1,
				'status_kawin' => $faker->randomElement($array = array ('kawin','belum kawin')),
				'alamat' => $faker->streetAddress,
				'alasan_tinggal' => $faker->sentence($nbWords = 6),
				'provinsi_id' => $faker->numberBetween($min = 1, $max = 5),
				'kabupaten_id' => $faker->numberBetween($min = 1, $max = 5),
				'kecamatan_id' => $faker->numberBetween($min = 1, $max = 5),
				'kelurahan_id' => $faker->numberBetween($min = 1, $max = 5),
				'nama_jaminan_kerja' => $faker->name($gender = null|'male'|'female'),
				'jabatan_jaminan_kerja' => $faker->country,
				'tempat_kerja' => $faker->city,
				'tanggal_lapor' => $faker->date($format = 'Y-m-d', $max = 'now'),
				'tanggal_akhir' => $faker->date($format = 'Y-m-d', $max = 'now'),
				'is_perpanjangan' => 0,
				'penduduk_id' => $faker->numberBetween($min = 1, $max = 10),
				'user_id' => 1
			]);
		}
	}

}